Skip to content

Instantly share code, notes, and snippets.

@Geczy
Geczy / migrate.sh
Last active May 13, 2024 10:37
Migrate Coolify to a new server
#!/bin/bash
# This script will backup your Coolify instance and move everything to a new server. Docker volumes, Coolify database, and ssh keys
# 1. Script must run on the source server
# 2. Have all the containers running that you want to migrate
# Configuration - Modify as needed
sshKeyPath="$HOME/.ssh/your_private_key" # Key to destination server
destinationHost="server.example.com"
@UnaNancyOwen
UnaNancyOwen / CMakeLists.txt
Last active May 13, 2024 10:36
Drawing Point Cloud retrieve from Velodyne VLP-16
cmake_minimum_required( VERSION 2.8 )
# Create Project
project( solution )
add_executable( project main.cpp )
# Set StartUp Project (Option)
# (This setting is able to enable by using CMake 3.6.0 RC1 or later.)
set_property( DIRECTORY PROPERTY VS_STARTUP_PROJECT "project" )
import type { V2_HtmlMetaDescriptor, V2_MetaFunction } from "@remix-run/node";
export const mergeMeta = (
overrideFn: V2_MetaFunction,
appendFn?: V2_MetaFunction,
): V2_MetaFunction => {
return arg => {
// get meta from parent routes
let mergedMeta = arg.matches.reduce((acc, match) => {
return acc.concat(match.meta || []);
@floydnoel
floydnoel / git-ignore-cleaner.sh
Last active May 13, 2024 10:36
Remove all files from a Git repo based on the .gitignore file
#!/bin/bash
echo "Cleaning up any git ignored files..."
# copy and paste the line below to get the same results as running this script
git rm --cached `git ls-files -ic --exclude-from=.gitignore`
echo "Finished clean up."
# source: https://stackoverflow.com/questions/13541615/how-to-remove-files-that-are-listed-in-the-gitignore-but-still-on-the-repositor/13541721
@seltzered
seltzered / IllustratorSaveAsSVGs.jsx
Last active May 13, 2024 10:33
Quick little script to batch-convert Illustrator .ai's to .svg's, based on Adobe's sample 'save to pdf's' script. Save it to a jsx, and load it under illustrator. Intended for Illustrator CS6.
/**********************************************************
ADOBE SYSTEMS INCORPORATED
Copyright 2005-2010 Adobe Systems Incorporated
All Rights Reserved
NOTICE: Adobe permits you to use, modify, and
distribute this file in accordance with the terms
of the Adobe license agreement accompanying it.
If you have received this file from a source
@terry90
terry90 / unfollow.js
Last active May 13, 2024 10:32
LinkedIn mass unfollow
const SPEED = 150 // ms
// Open the console and paste this on linkedin.com/feed/following
function unfollowCurrent(elems, callback) {
console.log('Unfollowing ', elems.length, ' contacts')
elems.forEach(
(e, i) =>
setTimeout(() => e.click(), i * SPEED)
)
setTimeout(callback, elems.length * SPEED)
@Mahdisadjadi
Mahdisadjadi / Tight-Binding Calculation of the Band Structure of Silicon.ipynb The band structure of Silicon is calculated using the empirical tight-binding method implemented in the Python programming language. Only interactions between first nearest neighbors are taken into account. The energy splittings for Silicon at symmetry points appear to be somewhat accurate to accepted values, although second neighbors will have …
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@conholdate-gists
conholdate-gists / Delete-PDF-Page.cs
Created May 13, 2024 10:30
Add or Delete Pages in PDF using C# | Insert Remove Pages in PDF
// Load the input PDF document
Document document = new Document("Sample.pdf");
// Delete the Page Number Two - The 2nd Page
document.Pages.Delete(1);
// Save output PDF file
document.Save("Page_Deleted.pdf");
index
home
top
help
about
security
contact
connect
support
faq
@ChenyangGao
ChenyangGao / qrcode_cookie_115
Last active May 13, 2024 10:28
115扫码登录,可选择 app,获取 cookie